package com.spring.component.exception;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import lombok.Data;

@Data
public class I18nMessage {
    private String code;
    private List<String> paramList;

    public I18nMessage(String code, String... params) {
        this.code = code;
        paramList = new ArrayList<>(params.length);
        Arrays.stream(params).forEach(arg ->
                paramList.add(arg)
        );
    }
}
